package cn.chainfind.common.utils.excel;

import com.github.crab2died.converter.WriteConvertible;
import com.github.crab2died.utils.DateUtils;

import java.util.Date;

/**
     * 导出excel日期数据转换器
     */
    public class DateFormatConverter implements WriteConvertible {
        @Override
        public Object execWrite(Object object) {
    
            Long timestamp = (Long) object;
            Date date = new Date(timestamp);
            return DateUtils.date2Str(date, DateUtils.DATE_FORMAT_SEC);
        }
    }
